package action;

import action.base.BaseAction;

public class KnowledgeAction extends BaseAction {
	private int[] ledgeSort;
	private String[] klName;
	private int[] continent;
	private int[] country;
	private String[] ledgeNumber;
	public int[] getLedgeSort() {
		return ledgeSort;
	}

	public void setLedgeSort(int[] ledgeSort) {
		this.ledgeSort = ledgeSort;
	}

	public String[] getKlName() {
		return klName;
	}

	public void setKlName(String[] klName) {
		this.klName = klName;
	}

	public int[] getContinent() {
		return continent;
	}

	public void setContinent(int[] continent) {
		this.continent = continent;
	}

	public int[] getCountry() {
		return country;
	}

	public void setCountry(int[] country) {
		this.country = country;
	}

	public String[] getLedgeNumber() {
		return ledgeNumber;
	}

	public void setLedgeNumber(String[] ledgeNumber) {
		this.ledgeNumber = ledgeNumber;
	}

	public String execute() throws Exception{
		mgk.delAllInfo();
		for(int i=0;i<ledgeSort.length;i++){
			if(klName[i] == null || klName[i].length()==0){
				break;
			}
			mgk.addKnowledgeManager(ledgeSort[i], klName[i], continent[i], country[i], ledgeNumber[i]);
	
		}
		return "success";
	}
}
